# -*- coding:utf8 -*- #
# -----------------------------------------------------------------------------------
# ProjectName:  smalleel-api-tools
# FileName:     acceptConfig.py
# Author  :     
# Datetime:     2023/3/28 9:39
# Description：验收配置文件
# -----------------------------------------------------------------------------------
from common.util.jsonUtil.jsonUtil import read_sql_json
from common.util.mySqlUtil.mySqlUtil import select_sql


class AcceptanceConfig:
    # 项目名称
    # proName = "辰鳗科技落地测试"
    proName = "水表01"
    sql = read_sql_json('acceptance_sql', 'proId', 1, proName)
    proId = select_sql(sql)[0][0]
    # 是否买断(0否，1是)
    isBuy = 0
    # isBuy = 1
    # 基站设备类型(1是电表基站，6是水表基站)
    deviceType = 6
    # deviceType = 1
    # 电表配置(RS三相二次电表、RS单相电表)
    deviceName = "RS三相一次电表"
    # deviceName = "RS单相电表"
    deviceModelId = select_sql(read_sql_json('acceptance_sql', 'modelAid', 1, deviceName))[0][0]
    # 电表基站配置
    collectorName = "微型基站"
    # collectorName = "电表4G微型基站"
    collectorModelId = select_sql(read_sql_json('acceptance_sql', 'modelAid', 1, collectorName))[0][0]
    # 水表配置
    waterName = "智能水表"
    waterModelId = select_sql(read_sql_json('acceptance_sql', 'modelAid', 1, waterName))[0][0]
    # 水表基站配置
    collectionName = "水表基站"
    collectionModelId = select_sql(read_sql_json('acceptance_sql', 'modelAid', 1, collectionName))[0][0]


if __name__ == '__main__':
    Acc = AcceptanceConfig()
    # print(Acc.sql)
    print(Acc.deviceModelId)
